0589e27e7bb84ec81e1438bcbf3f2fd80ee5a963,zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java,NotebookServer,setNoteRevision,#NotebookSocket#HashSet#Notebook#Message#,1698

Before Change


    String revisionId = (String) fromMessage.get("revisionId");
    AuthenticationInfo subject = new AuthenticationInfo(fromMessage.principal);

    NotebookAuthorization notebookAuthorization = notebook.getNotebookAuthorization();
    if (!notebookAuthorization.isWriter(noteId, userAndRoles)) {
      permissionError(conn, "update", fromMessage.principal, userAndRoles,
          notebookAuthorization.getWriters(noteId));
      return;
    }

    Note headNote = null;
    boolean setRevisionStatus;

After Change


        serializeMessage(new Message(OP.LIST_REVISION_HISTORY).put("revisionList", revisions)));
  }

  private void setNoteRevision(NotebookSocket conn, HashSet<String> userAndRoles, Notebook notebook,
      Message fromMessage) throws IOException {

    String noteId = (String) fromMessage.get("noteId");
    String revisionId = (String) fromMessage.get("revisionId");
    AuthenticationInfo subject = new AuthenticationInfo(fromMessage.principal);

    if (!hasParagraphWriterPermission(conn, notebook, noteId,
        userAndRoles, fromMessage.principal, "update")) {
      return;
    }

    Note headNote = null;
    boolean setRevisionStatus;